clearset more offset mem 40m#delimit ;log using "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/figure_2", replace text;use "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/data_IO";/* MODEL 1 */;heckman r_moodys chga_demo currentacctlag gdpcapgrowthlag res_gdplag inflatwdi1 l_trade_gdp resourcelag default, select (rated_2= chga_demo currentacctlag gdpcapgrowthlag res_gdplag inflatwdi1 l_trade_gdp resourcelag default flow1 d1960-d2000) vce(robust) cluster(ccode) mills(lambda);predict ycond, ycond; predict probseen, psel;label var probseen "Predicted Probability of Securing Rating";twoway fpfitci moodyrating probseen if chga_demo==1, ylabel(0 (2)16) xlabel(0 (.1) 1) legend(pos(6) col(2) lab(2 "Democracy"))ytitle("Moodys Rating")||  fpfitci moodyrating probseen if chga_demo==0, lp(dash) legend(pos(6) col(2) lab(4 "Autocracy"));graph save "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/figure2.gph", replace;graph export "/Users/sebastian/Mac/UCSD/Debt/BCS/Replication Materials/figure2.png", as(png) replace;log c; 